﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestProject
{
    public partial class MainTestForm : Form
    {
        public MainTestForm()
        {
            InitializeComponent();
        }

        Color oldColor = Color.White;

        private void MainTestForm_Load(object sender, EventArgs e)
        {
            lblTest1.Click += (s1, e1) =>
            {
                oldColor = Color.White;
            };

            lblTest1.MouseEnter += (s1, e1) =>
            {
                oldColor = lblTest1.BackColor;
                lblTest1.BackColor = Color.White;
            };

            lblTest1.MouseLeave += (s1, e1) =>
            {
                lblTest1.BackColor = oldColor;
            };
        }

         
    }
}
